<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="product" tagdir="/WEB-INF/tags/product"%>
<%@ taglib prefix="sales" tagdir="/WEB-INF/tags/sales"%>


<div class="top clearfix">
	<ul class="tab">
		<li class="curr"><span><fmt:message key="giftSelector.title"/></span></li>
	</ul>
	<b class="red">[<fmt:message key="productSelector.title.tip"/>]</b>
	<%@include file="/common/pagingOnlyTop.jsp"%>
</div>
<div class="data" style="">
	<display:table name="${giftList}" cellspacing="0" cellpadding="0"	uid="gift" class="list_table" style="width:100%;" export="false"	requestURI="">
		<display:column style="width:10%;" sortable="false" headerClass="data-table-title"
			decorator="com.probiz.estore.core.decorator.TblColumnDecorator"
			titleKey="gift.imageUrl">
			<a href="javascript:void(0)"	onclick='selectGift(${gift.giftId})'><sales:giftImage gift="${gift}" sizeType="s0" linkType="0"/></a>
		</display:column>
		<display:column style="width:15%;" sortable="false" paramProperty="giftId"
			decorator="com.probiz.estore.core.decorator.TblColumnDecorator"
			titleKey="product.productName">
			<b><a href="javascript:void(0)"	onclick='selectGift(${gift.giftId})'>${gift.giftName}</a></b>
			
			<c:set var="minOrderQuantity" value="1"/>
			<c:if test="${not empty gift.minOrderQuantity}">
				<c:set var="minOrderQuantity" value="${gift.minOrderQuantity}"/>
			</c:if>
			<input type="hidden" id="giftName_${gift.giftId}" value="${gift.giftName}"/>	
			<input type="hidden" id="giftCode_${gift.giftId}" value="${gift.giftCode}"/>	
			<input type="hidden" id="imageUrl_${gift.giftId}" value="${gift.imageUrl}"/>	 
			<input type="hidden" id="minOrderQuantity_${gift.giftId}" value="${minOrderQuantity}"/>
	
		</display:column>
		<display:column style="width: 15%" sortable="false" headerClass="data-table-title" decorator="com.probiz.estore.core.decorator.TblColumnDecorator"	titleKey="gift.giftCode">
			${gift.giftCode}
		</display:column>
		<display:column style="width: 15%" sortable="false" headerClass="data-table-title" decorator="com.probiz.estore.core.decorator.TblColumnDecorator"	titleKey="gift.price">
			<p><ins><common:currencyFormat value="${gift.price}" /></ins></p>
		</display:column>
		<display:column style="width: 15%" sortable="false" headerClass="data-table-title" decorator="com.probiz.estore.core.decorator.TblColumnDecorator" titleKey="gift.point">
			${gift.point}
		</display:column>
		<display:column  sortable="false" headerClass="data-table-title" decorator="com.probiz.estore.core.decorator.TblColumnDecorator" titleKey="product.category">
			${gift.category.categoryName}
		</display:column>
		<display:column style="width: 10%;" sortable="false" headerClass="data-table-title" decorator="com.probiz.estore.core.decorator.TblColumnDecorator" titleKey="product.status">
			<fmt:message key="gift.status.${gift.status}"/>
		</display:column>
	</display:table>
</div>
<%@include file="/common/pagingOnly.jsp"%>

<%--------保存查询条件 -------%>
<%@include file="include/giftSearchCriteriaStorage.jspf"%>
<script type="text/javascript">
highlightTableRows("gift");
$j("#gift").chromatable({
    width: "100%",
    height: "490px",
    scrolling: "yes"
}); 
</script>
